export class Card{
    suit:string = ''
    rank:number = 0
    constructor(suit:string,rank:number){
        this.suit = suit;
        this.rank = rank;
    }
    toString():string{
        let new_rank:string = ''
        switch(this.rank){
            case 14:{
                new_rank = 'A'
                break
            }
            case 11:{
                new_rank = 'J'
                break
            }
            case 12:{
                new_rank = 'Q'
                break
            }
            case 13:{
                new_rank = 'K'
                break
            }
            default:{
            new_rank = this.rank+''
            break
            }
        }
        return this.suit + new_rank
    }
}
let card1 = new Card('红桃',13)
console.log(card1.toString());